{% extends 'base.html' %}
{% block content %}
    <form class="form-inline" method="post">
    {% csrf_token %}
  <div class="form-group">
    <label for="exampleInputName2">姓名</label>
    <input type="text" class="form-control" id="exampleInputName2" placeholder="Jane Doe" name="name">
  </div>
  <div class="form-group">
    <label for="exampleInputEmail2">年龄</label>
    <input type="text" class="form-control" id="exampleInputEmail2" placeholder="12" name="age">
  </div>
  <button type="submit" class="btn btn-default">提交</button>
</form>


<table class="table table-hover">
<thead>
<tr>
    <th>id</th>
    <th>姓名</th>
    <th>年龄</th>
    <th>操作</th>
</tr>
</thead>
<tbody>
{% for i in data %}
<tr>
    <td>{{ i.id }}</td>
    <td>{{ i.name }}</td>
    <td>{{ i.age }}</td>
    <td>
        <a href="/app01/edit/?nid={{ i.id }}" class="btn btn-primary">编辑</a>
        <a href="/app01/dele/?nid={{ i.id }}" class="btn btn-danger">删除</a>
    </td>
</tr>
{% endfor %}
</tbody>
</table>

{% endblock %}